// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * SalesFlatInvoice generated by hbm2java
 */
@Entity
@Table(name = "sales_flat_invoice", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = "increment_id"))
public class SalesFlatInvoice implements java.io.Serializable {

	private Integer entityId;
	private SalesFlatOrder salesFlatOrder;
	private CoreStore coreStore;
	private BigDecimal baseGrandTotal;
	private BigDecimal shippingTaxAmount;
	private BigDecimal taxAmount;
	private BigDecimal baseTaxAmount;
	private BigDecimal storeToOrderRate;
	private BigDecimal baseShippingTaxAmount;
	private BigDecimal baseDiscountAmount;
	private BigDecimal baseToOrderRate;
	private BigDecimal grandTotal;
	private BigDecimal shippingAmount;
	private BigDecimal subtotalInclTax;
	private BigDecimal baseSubtotalInclTax;
	private BigDecimal storeToBaseRate;
	private BigDecimal baseShippingAmount;
	private BigDecimal totalQty;
	private BigDecimal baseToGlobalRate;
	private BigDecimal subtotal;
	private BigDecimal baseSubtotal;
	private BigDecimal discountAmount;
	private Integer billingAddressId;
	private Short isUsedForRefund;
	private Short emailSent;
	private Short canVoidFlag;
	private Integer state;
	private Integer shippingAddressId;
	private String cybersourceToken;
	private String storeCurrencyCode;
	private String transactionId;
	private String orderCurrencyCode;
	private String baseCurrencyCode;
	private String globalCurrencyCode;
	private String incrementId;
	private Date createdAt;
	private Date updatedAt;
	private Integer customerId;
	private Integer invoiceStatusId;
	private Integer invoiceType;
	private Integer isVirtual;
	private String realOrderId;
	private BigDecimal totalDue;
	private BigDecimal totalPaid;
	private BigDecimal hiddenTaxAmount;
	private BigDecimal baseHiddenTaxAmount;
	private BigDecimal shippingHiddenTaxAmount;
	private BigDecimal baseShippingHiddenTaxAmnt;
	private BigDecimal shippingInclTax;
	private BigDecimal baseShippingInclTax;
	private BigDecimal baseTotalRefunded;
	private Set salesFlatInvoiceComments = new HashSet(0);
	private Set salesFlatInvoiceItems = new HashSet(0);
	private SalesFlatInvoiceGrid salesFlatInvoiceGrid;

	public SalesFlatInvoice() {
	}

	public SalesFlatInvoice(SalesFlatOrder salesFlatOrder) {
		this.salesFlatOrder = salesFlatOrder;
	}

	public SalesFlatInvoice(SalesFlatOrder salesFlatOrder, CoreStore coreStore,
			BigDecimal baseGrandTotal, BigDecimal shippingTaxAmount,
			BigDecimal taxAmount, BigDecimal baseTaxAmount,
			BigDecimal storeToOrderRate, BigDecimal baseShippingTaxAmount,
			BigDecimal baseDiscountAmount, BigDecimal baseToOrderRate,
			BigDecimal grandTotal, BigDecimal shippingAmount,
			BigDecimal subtotalInclTax, BigDecimal baseSubtotalInclTax,
			BigDecimal storeToBaseRate, BigDecimal baseShippingAmount,
			BigDecimal totalQty, BigDecimal baseToGlobalRate,
			BigDecimal subtotal, BigDecimal baseSubtotal,
			BigDecimal discountAmount, Integer billingAddressId,
			Short isUsedForRefund, Short emailSent, Short canVoidFlag,
			Integer state, Integer shippingAddressId, String cybersourceToken,
			String storeCurrencyCode, String transactionId,
			String orderCurrencyCode, String baseCurrencyCode,
			String globalCurrencyCode, String incrementId, Date createdAt,
			Date updatedAt, Integer customerId, Integer invoiceStatusId,
			Integer invoiceType, Integer isVirtual, String realOrderId,
			BigDecimal totalDue, BigDecimal totalPaid,
			BigDecimal hiddenTaxAmount, BigDecimal baseHiddenTaxAmount,
			BigDecimal shippingHiddenTaxAmount,
			BigDecimal baseShippingHiddenTaxAmnt, BigDecimal shippingInclTax,
			BigDecimal baseShippingInclTax, BigDecimal baseTotalRefunded,
			Set salesFlatInvoiceComments, Set salesFlatInvoiceItems,
			SalesFlatInvoiceGrid salesFlatInvoiceGrid) {
		this.salesFlatOrder = salesFlatOrder;
		this.coreStore = coreStore;
		this.baseGrandTotal = baseGrandTotal;
		this.shippingTaxAmount = shippingTaxAmount;
		this.taxAmount = taxAmount;
		this.baseTaxAmount = baseTaxAmount;
		this.storeToOrderRate = storeToOrderRate;
		this.baseShippingTaxAmount = baseShippingTaxAmount;
		this.baseDiscountAmount = baseDiscountAmount;
		this.baseToOrderRate = baseToOrderRate;
		this.grandTotal = grandTotal;
		this.shippingAmount = shippingAmount;
		this.subtotalInclTax = subtotalInclTax;
		this.baseSubtotalInclTax = baseSubtotalInclTax;
		this.storeToBaseRate = storeToBaseRate;
		this.baseShippingAmount = baseShippingAmount;
		this.totalQty = totalQty;
		this.baseToGlobalRate = baseToGlobalRate;
		this.subtotal = subtotal;
		this.baseSubtotal = baseSubtotal;
		this.discountAmount = discountAmount;
		this.billingAddressId = billingAddressId;
		this.isUsedForRefund = isUsedForRefund;
		this.emailSent = emailSent;
		this.canVoidFlag = canVoidFlag;
		this.state = state;
		this.shippingAddressId = shippingAddressId;
		this.cybersourceToken = cybersourceToken;
		this.storeCurrencyCode = storeCurrencyCode;
		this.transactionId = transactionId;
		this.orderCurrencyCode = orderCurrencyCode;
		this.baseCurrencyCode = baseCurrencyCode;
		this.globalCurrencyCode = globalCurrencyCode;
		this.incrementId = incrementId;
		this.createdAt = createdAt;
		this.updatedAt = updatedAt;
		this.customerId = customerId;
		this.invoiceStatusId = invoiceStatusId;
		this.invoiceType = invoiceType;
		this.isVirtual = isVirtual;
		this.realOrderId = realOrderId;
		this.totalDue = totalDue;
		this.totalPaid = totalPaid;
		this.hiddenTaxAmount = hiddenTaxAmount;
		this.baseHiddenTaxAmount = baseHiddenTaxAmount;
		this.shippingHiddenTaxAmount = shippingHiddenTaxAmount;
		this.baseShippingHiddenTaxAmnt = baseShippingHiddenTaxAmnt;
		this.shippingInclTax = shippingInclTax;
		this.baseShippingInclTax = baseShippingInclTax;
		this.baseTotalRefunded = baseTotalRefunded;
		this.salesFlatInvoiceComments = salesFlatInvoiceComments;
		this.salesFlatInvoiceItems = salesFlatInvoiceItems;
		this.salesFlatInvoiceGrid = salesFlatInvoiceGrid;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "entity_id", unique = true, nullable = false)
	public Integer getEntityId() {
		return this.entityId;
	}

	public void setEntityId(Integer entityId) {
		this.entityId = entityId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "order_id", nullable = false)
	public SalesFlatOrder getSalesFlatOrder() {
		return this.salesFlatOrder;
	}

	public void setSalesFlatOrder(SalesFlatOrder salesFlatOrder) {
		this.salesFlatOrder = salesFlatOrder;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id")
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@Column(name = "base_grand_total", precision = 12, scale = 4)
	public BigDecimal getBaseGrandTotal() {
		return this.baseGrandTotal;
	}

	public void setBaseGrandTotal(BigDecimal baseGrandTotal) {
		this.baseGrandTotal = baseGrandTotal;
	}

	@Column(name = "shipping_tax_amount", precision = 12, scale = 4)
	public BigDecimal getShippingTaxAmount() {
		return this.shippingTaxAmount;
	}

	public void setShippingTaxAmount(BigDecimal shippingTaxAmount) {
		this.shippingTaxAmount = shippingTaxAmount;
	}

	@Column(name = "tax_amount", precision = 12, scale = 4)
	public BigDecimal getTaxAmount() {
		return this.taxAmount;
	}

	public void setTaxAmount(BigDecimal taxAmount) {
		this.taxAmount = taxAmount;
	}

	@Column(name = "base_tax_amount", precision = 12, scale = 4)
	public BigDecimal getBaseTaxAmount() {
		return this.baseTaxAmount;
	}

	public void setBaseTaxAmount(BigDecimal baseTaxAmount) {
		this.baseTaxAmount = baseTaxAmount;
	}

	@Column(name = "store_to_order_rate", precision = 12, scale = 4)
	public BigDecimal getStoreToOrderRate() {
		return this.storeToOrderRate;
	}

	public void setStoreToOrderRate(BigDecimal storeToOrderRate) {
		this.storeToOrderRate = storeToOrderRate;
	}

	@Column(name = "base_shipping_tax_amount", precision = 12, scale = 4)
	public BigDecimal getBaseShippingTaxAmount() {
		return this.baseShippingTaxAmount;
	}

	public void setBaseShippingTaxAmount(BigDecimal baseShippingTaxAmount) {
		this.baseShippingTaxAmount = baseShippingTaxAmount;
	}

	@Column(name = "base_discount_amount", precision = 12, scale = 4)
	public BigDecimal getBaseDiscountAmount() {
		return this.baseDiscountAmount;
	}

	public void setBaseDiscountAmount(BigDecimal baseDiscountAmount) {
		this.baseDiscountAmount = baseDiscountAmount;
	}

	@Column(name = "base_to_order_rate", precision = 12, scale = 4)
	public BigDecimal getBaseToOrderRate() {
		return this.baseToOrderRate;
	}

	public void setBaseToOrderRate(BigDecimal baseToOrderRate) {
		this.baseToOrderRate = baseToOrderRate;
	}

	@Column(name = "grand_total", precision = 12, scale = 4)
	public BigDecimal getGrandTotal() {
		return this.grandTotal;
	}

	public void setGrandTotal(BigDecimal grandTotal) {
		this.grandTotal = grandTotal;
	}

	@Column(name = "shipping_amount", precision = 12, scale = 4)
	public BigDecimal getShippingAmount() {
		return this.shippingAmount;
	}

	public void setShippingAmount(BigDecimal shippingAmount) {
		this.shippingAmount = shippingAmount;
	}

	@Column(name = "subtotal_incl_tax", precision = 12, scale = 4)
	public BigDecimal getSubtotalInclTax() {
		return this.subtotalInclTax;
	}

	public void setSubtotalInclTax(BigDecimal subtotalInclTax) {
		this.subtotalInclTax = subtotalInclTax;
	}

	@Column(name = "base_subtotal_incl_tax", precision = 12, scale = 4)
	public BigDecimal getBaseSubtotalInclTax() {
		return this.baseSubtotalInclTax;
	}

	public void setBaseSubtotalInclTax(BigDecimal baseSubtotalInclTax) {
		this.baseSubtotalInclTax = baseSubtotalInclTax;
	}

	@Column(name = "store_to_base_rate", precision = 12, scale = 4)
	public BigDecimal getStoreToBaseRate() {
		return this.storeToBaseRate;
	}

	public void setStoreToBaseRate(BigDecimal storeToBaseRate) {
		this.storeToBaseRate = storeToBaseRate;
	}

	@Column(name = "base_shipping_amount", precision = 12, scale = 4)
	public BigDecimal getBaseShippingAmount() {
		return this.baseShippingAmount;
	}

	public void setBaseShippingAmount(BigDecimal baseShippingAmount) {
		this.baseShippingAmount = baseShippingAmount;
	}

	@Column(name = "total_qty", precision = 12, scale = 4)
	public BigDecimal getTotalQty() {
		return this.totalQty;
	}

	public void setTotalQty(BigDecimal totalQty) {
		this.totalQty = totalQty;
	}

	@Column(name = "base_to_global_rate", precision = 12, scale = 4)
	public BigDecimal getBaseToGlobalRate() {
		return this.baseToGlobalRate;
	}

	public void setBaseToGlobalRate(BigDecimal baseToGlobalRate) {
		this.baseToGlobalRate = baseToGlobalRate;
	}

	@Column(name = "subtotal", precision = 12, scale = 4)
	public BigDecimal getSubtotal() {
		return this.subtotal;
	}

	public void setSubtotal(BigDecimal subtotal) {
		this.subtotal = subtotal;
	}

	@Column(name = "base_subtotal", precision = 12, scale = 4)
	public BigDecimal getBaseSubtotal() {
		return this.baseSubtotal;
	}

	public void setBaseSubtotal(BigDecimal baseSubtotal) {
		this.baseSubtotal = baseSubtotal;
	}

	@Column(name = "discount_amount", precision = 12, scale = 4)
	public BigDecimal getDiscountAmount() {
		return this.discountAmount;
	}

	public void setDiscountAmount(BigDecimal discountAmount) {
		this.discountAmount = discountAmount;
	}

	@Column(name = "billing_address_id")
	public Integer getBillingAddressId() {
		return this.billingAddressId;
	}

	public void setBillingAddressId(Integer billingAddressId) {
		this.billingAddressId = billingAddressId;
	}

	@Column(name = "is_used_for_refund")
	public Short getIsUsedForRefund() {
		return this.isUsedForRefund;
	}

	public void setIsUsedForRefund(Short isUsedForRefund) {
		this.isUsedForRefund = isUsedForRefund;
	}

	@Column(name = "email_sent")
	public Short getEmailSent() {
		return this.emailSent;
	}

	public void setEmailSent(Short emailSent) {
		this.emailSent = emailSent;
	}

	@Column(name = "can_void_flag")
	public Short getCanVoidFlag() {
		return this.canVoidFlag;
	}

	public void setCanVoidFlag(Short canVoidFlag) {
		this.canVoidFlag = canVoidFlag;
	}

	@Column(name = "state")
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Column(name = "shipping_address_id")
	public Integer getShippingAddressId() {
		return this.shippingAddressId;
	}

	public void setShippingAddressId(Integer shippingAddressId) {
		this.shippingAddressId = shippingAddressId;
	}

	@Column(name = "cybersource_token")
	public String getCybersourceToken() {
		return this.cybersourceToken;
	}

	public void setCybersourceToken(String cybersourceToken) {
		this.cybersourceToken = cybersourceToken;
	}

	@Column(name = "store_currency_code", length = 3)
	public String getStoreCurrencyCode() {
		return this.storeCurrencyCode;
	}

	public void setStoreCurrencyCode(String storeCurrencyCode) {
		this.storeCurrencyCode = storeCurrencyCode;
	}

	@Column(name = "transaction_id")
	public String getTransactionId() {
		return this.transactionId;
	}

	public void setTransactionId(String transactionId) {
		this.transactionId = transactionId;
	}

	@Column(name = "order_currency_code", length = 3)
	public String getOrderCurrencyCode() {
		return this.orderCurrencyCode;
	}

	public void setOrderCurrencyCode(String orderCurrencyCode) {
		this.orderCurrencyCode = orderCurrencyCode;
	}

	@Column(name = "base_currency_code", length = 3)
	public String getBaseCurrencyCode() {
		return this.baseCurrencyCode;
	}

	public void setBaseCurrencyCode(String baseCurrencyCode) {
		this.baseCurrencyCode = baseCurrencyCode;
	}

	@Column(name = "global_currency_code", length = 3)
	public String getGlobalCurrencyCode() {
		return this.globalCurrencyCode;
	}

	public void setGlobalCurrencyCode(String globalCurrencyCode) {
		this.globalCurrencyCode = globalCurrencyCode;
	}

	@Column(name = "increment_id", unique = true, length = 50)
	public String getIncrementId() {
		return this.incrementId;
	}

	public void setIncrementId(String incrementId) {
		this.incrementId = incrementId;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "created_at", length = 19)
	public Date getCreatedAt() {
		return this.createdAt;
	}

	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "updated_at", length = 19)
	public Date getUpdatedAt() {
		return this.updatedAt;
	}

	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}

	@Column(name = "customer_id")
	public Integer getCustomerId() {
		return this.customerId;
	}

	public void setCustomerId(Integer customerId) {
		this.customerId = customerId;
	}

	@Column(name = "invoice_status_id")
	public Integer getInvoiceStatusId() {
		return this.invoiceStatusId;
	}

	public void setInvoiceStatusId(Integer invoiceStatusId) {
		this.invoiceStatusId = invoiceStatusId;
	}

	@Column(name = "invoice_type")
	public Integer getInvoiceType() {
		return this.invoiceType;
	}

	public void setInvoiceType(Integer invoiceType) {
		this.invoiceType = invoiceType;
	}

	@Column(name = "is_virtual")
	public Integer getIsVirtual() {
		return this.isVirtual;
	}

	public void setIsVirtual(Integer isVirtual) {
		this.isVirtual = isVirtual;
	}

	@Column(name = "real_order_id")
	public String getRealOrderId() {
		return this.realOrderId;
	}

	public void setRealOrderId(String realOrderId) {
		this.realOrderId = realOrderId;
	}

	@Column(name = "total_due", precision = 12, scale = 4)
	public BigDecimal getTotalDue() {
		return this.totalDue;
	}

	public void setTotalDue(BigDecimal totalDue) {
		this.totalDue = totalDue;
	}

	@Column(name = "total_paid", precision = 12, scale = 4)
	public BigDecimal getTotalPaid() {
		return this.totalPaid;
	}

	public void setTotalPaid(BigDecimal totalPaid) {
		this.totalPaid = totalPaid;
	}

	@Column(name = "hidden_tax_amount", precision = 12, scale = 4)
	public BigDecimal getHiddenTaxAmount() {
		return this.hiddenTaxAmount;
	}

	public void setHiddenTaxAmount(BigDecimal hiddenTaxAmount) {
		this.hiddenTaxAmount = hiddenTaxAmount;
	}

	@Column(name = "base_hidden_tax_amount", precision = 12, scale = 4)
	public BigDecimal getBaseHiddenTaxAmount() {
		return this.baseHiddenTaxAmount;
	}

	public void setBaseHiddenTaxAmount(BigDecimal baseHiddenTaxAmount) {
		this.baseHiddenTaxAmount = baseHiddenTaxAmount;
	}

	@Column(name = "shipping_hidden_tax_amount", precision = 12, scale = 4)
	public BigDecimal getShippingHiddenTaxAmount() {
		return this.shippingHiddenTaxAmount;
	}

	public void setShippingHiddenTaxAmount(BigDecimal shippingHiddenTaxAmount) {
		this.shippingHiddenTaxAmount = shippingHiddenTaxAmount;
	}

	@Column(name = "base_shipping_hidden_tax_amnt", precision = 12, scale = 4)
	public BigDecimal getBaseShippingHiddenTaxAmnt() {
		return this.baseShippingHiddenTaxAmnt;
	}

	public void setBaseShippingHiddenTaxAmnt(
			BigDecimal baseShippingHiddenTaxAmnt) {
		this.baseShippingHiddenTaxAmnt = baseShippingHiddenTaxAmnt;
	}

	@Column(name = "shipping_incl_tax", precision = 12, scale = 4)
	public BigDecimal getShippingInclTax() {
		return this.shippingInclTax;
	}

	public void setShippingInclTax(BigDecimal shippingInclTax) {
		this.shippingInclTax = shippingInclTax;
	}

	@Column(name = "base_shipping_incl_tax", precision = 12, scale = 4)
	public BigDecimal getBaseShippingInclTax() {
		return this.baseShippingInclTax;
	}

	public void setBaseShippingInclTax(BigDecimal baseShippingInclTax) {
		this.baseShippingInclTax = baseShippingInclTax;
	}

	@Column(name = "base_total_refunded", precision = 12, scale = 4)
	public BigDecimal getBaseTotalRefunded() {
		return this.baseTotalRefunded;
	}

	public void setBaseTotalRefunded(BigDecimal baseTotalRefunded) {
		this.baseTotalRefunded = baseTotalRefunded;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "salesFlatInvoice")
	public Set getSalesFlatInvoiceComments() {
		return this.salesFlatInvoiceComments;
	}

	public void setSalesFlatInvoiceComments(Set salesFlatInvoiceComments) {
		this.salesFlatInvoiceComments = salesFlatInvoiceComments;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "salesFlatInvoice")
	public Set getSalesFlatInvoiceItems() {
		return this.salesFlatInvoiceItems;
	}

	public void setSalesFlatInvoiceItems(Set salesFlatInvoiceItems) {
		this.salesFlatInvoiceItems = salesFlatInvoiceItems;
	}

	@OneToOne(fetch = FetchType.LAZY, mappedBy = "salesFlatInvoice")
	public SalesFlatInvoiceGrid getSalesFlatInvoiceGrid() {
		return this.salesFlatInvoiceGrid;
	}

	public void setSalesFlatInvoiceGrid(
			SalesFlatInvoiceGrid salesFlatInvoiceGrid) {
		this.salesFlatInvoiceGrid = salesFlatInvoiceGrid;
	}

}
